import { BaseEntity } from '../../../shared/baseEntity';
import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';

export enum ParameterType {
  NUMBER = 'number',
  STRING = 'string',
  ARRAY = 'array',
  FILE = 'file'
}

@Entity('parameters')
export class Parameter extends BaseEntity {

  @PrimaryGeneratedColumn()
  public id: number;

  @Column()
  public product: string;

  @Column()
  public name: string;

  @Column()
  public desc: string;

  @Column({
    type: 'enum',
    enum: ParameterType,
    default: ParameterType.NUMBER
  })
  public type: ParameterType;
}

